#-*-coding:utf8-*-


class TweetStatus(object):
    '''
    Class that includes information of the status
    Currently it has follwing status attrs:
    raw_json : string : json dump string which from twitter api
        screen_name : string : writer's screen name
        author_id : long : writer's id
        status_id : long : status id
        message : string : status message
        date : datetime : written date of the status
        parent : long : status id of the replied status
    '''

    def __init__(self, row):
        self.raw_json = row["json_dump"]
        self.screen_name = row["screen_name"]
        self.author_id = row["author_id"]
        self.status_id = row["status_id"]
        self.message = row["message"]
        self.date = row["date"]
        self.api = row["api"]
        self.parent = row["parent"]

    def __unicode__(self):
        return self.screen_name + ", " + str(self.status_id) + ", " + \
                self.message + " " + str(self.date)


class TweetAccount(object):
    '''
    Class that includes information of the account
    Currently it has follwing account attrs:
    '''

    def __init__(self, row):
        self.screen_name = row["screen_name"]
        self.user_id = row["user_id"]
        self.created_at = row["created_at"]
        self.bio = row["bio"]
        self.profile_image_url = row["profile_image_url"]

    def __unicode__(self):
        return self.screen_name + ", " + str(self.user_id) + ", " + \
                str(self.created_at)
